//
//  CourseWareReturnJson.swift
//  Amicool
//
//  Created by Mac  on 2017/6/14.
//  Copyright © 2017年 Mac . All rights reserved.
//

import Foundation


class CourseWareReturnJson: NSObject{
    var name:String?
    var thumb:String?
    var desc:String?
    var kcmc:String?
    var author:String?
    var pdfattach:String?
    var update_time:String?
    static let pdfUrlPre = "http://amicool.neusoft.edu.cn/Uploads/"
    class  func coursewareListModelWithDict(dict:NSDictionary?)->CourseWareReturnJson?{
        if ( dict == nil){
            return nil
        }
        let model:CourseWareReturnJson? = CourseWareReturnJson()
        if model != nil {
            model?.name = dict!["name"] as? String
            model?.thumb = dict!["thumb"] as? String
            model?.desc = dict!["description"] as? String
            model?.kcmc = dict!["kcmc"] as? String
            model?.author = dict!["author"] as? String
            model?.pdfattach = pdfUrlPre + (dict!["pdfattach"] as! String)
            model?.update_time = dict!["update_time"] as? String
        }
        return model
        
    }
    
  
    
}
